package com.hk.cafe.control;

import com.hk.action.Action;
import com.hk.action.ActionFactory;
import com.hk.notice.*;
import com.hk.login.LogoutAction;

public class NoticeActionFactory implements ActionFactory{
	
	private static NoticeActionFactory factory;
	
	public static NoticeActionFactory getInstance(){
		if(factory==null){
			factory=new NoticeActionFactory();
		}
		return factory;
	}
	
	
	
	
	
	public Action getAction(String command){
		Action action=null;
			if(command.equalsIgnoreCase("list")){
			action=new ListAction();
			
		}else if(command.equalsIgnoreCase("write")){
			action=new WriteAction();
			
		}else if(command.equalsIgnoreCase("writego")){
			action=new WriteGoAction();
			
		}else if(command.equalsIgnoreCase("view")){
			action=new ViewAction();
		}else if(command.equalsIgnoreCase("answer")){
			action=new AnswerAction();
		}else if(command.equalsIgnoreCase("answergo")){
			action=new AnswerGoAction();
		}else if(command.equalsIgnoreCase("mod")){
			action=new ModAction();
		}else if(command.equalsIgnoreCase("modgo")){
			action=new ModGoAction();
		}else if(command.equalsIgnoreCase("del")){
			action=new DelAction();
		}else if(command.equalsIgnoreCase("logout")){
			action=new LogoutAction();
		}else if(command.equalsIgnoreCase("hiddenview")){
			action=new HiddenViewAction();
		}else if(command.equalsIgnoreCase("info")){
			action=new InfoAction();
		}
		
		return action;
	}//
	
}


